
package com.eyedog.library;

import android.content.Context;

import com.bumptech.glide.Glide;
import com.bumptech.glide.GlideBuilder;
import com.bumptech.glide.load.engine.cache.InternalCacheDiskCacheFactory;
import com.bumptech.glide.module.GlideModule;

public class CustomGlideModule implements GlideModule {
    private static final int DISK_CACHE_POOL_SIZE = 100 * 1024 * 1024;

    private static final int MEMORY_CACHE_POOL_SIZE = 10 * 1024 * 1024;

    @Override
    public void registerComponents(Context context, Glide glide) {

    }

    @Override
    public void applyOptions(Context context, GlideBuilder builder) {
        builder.setDiskCache(new InternalCacheDiskCacheFactory(context, DISK_CACHE_POOL_SIZE));
    }
}
